package com.tgm.domain.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.math.BigDecimal;
import java.util.Date;

import lombok.AllArgsConstructor;
import lombok.Data;

/**
 * 消费记录表
 * @TableName consumption_record
 */
@TableName(value ="consumption_record")
@Data
public class ConsumptionRecord {
    /**
     * 记录唯一ID
     */
    @TableId(value = "record_id", type = IdType.AUTO)
    private Long recordId;

    /**
     * 关联用户ID
     */
    @TableField(value = "user_id")
    private String userId;

    /**
     * 关联商户ID
     */
    @TableField(value = "merchant_id")
    private String merchantId;

    /**
     * 消费时间（精确到秒）
     */
    @TableField(value = "consume_time")
    private Date consumeTime;

    /**
     * 消费金额（元）
     */
    @TableField(value = "amount")
    private BigDecimal amount;

    /**
     * 是否异常交易（0-正常，1-异常）
     */
    @TableField(value = "is_abnormal")
    private Integer isAbnormal;

    /**
     * 异常原因
     */
    @TableField(value = "abnormal_reason")
    private String abnormalReason;

}